package com.qianwei.footpath.bean;

import androidx.annotation.NonNull;

import java.util.ArrayList;
import java.util.List;

public class BodyCompositionData {
    // 基本指标
    private float bodyFatRate;       // 体脂肪率(%)
    private float bodyWaterRate;     // 体水分率(%)
    private float protein;           // 蛋白质(kg)
    private float intracellularFluid; // 细胞内液(L)
    private float extracellularFluid; // 细胞外液(L)
    private float muscleMass;        // 肌肉量(kg)
    private int basalMetabolism;     // 基础代谢(Kcal)
    private float fatFreeWeight;     // 去脂体重(kg)
    private float inorganicSalt;    // 无机盐(kg)

    public float getBodyFatRate() {
        return bodyFatRate;
    }

    public void setBodyFatRate(float bodyFatRate) {
        this.bodyFatRate = bodyFatRate;
    }

    public float getBodyWaterRate() {
        return bodyWaterRate;
    }

    public void setBodyWaterRate(float bodyWaterRate) {
        this.bodyWaterRate = bodyWaterRate;
    }

    public float getProtein() {
        return protein;
    }

    public void setProtein(float protein) {
        this.protein = protein;
    }

    public float getIntracellularFluid() {
        return intracellularFluid;
    }

    public void setIntracellularFluid(float intracellularFluid) {
        this.intracellularFluid = intracellularFluid;
    }

    public float getExtracellularFluid() {
        return extracellularFluid;
    }

    public void setExtracellularFluid(float extracellularFluid) {
        this.extracellularFluid = extracellularFluid;
    }

    public float getMuscleMass() {
        return muscleMass;
    }

    public void setMuscleMass(float muscleMass) {
        this.muscleMass = muscleMass;
    }

    public int getBasalMetabolism() {
        return basalMetabolism;
    }

    public void setBasalMetabolism(int basalMetabolism) {
        this.basalMetabolism = basalMetabolism;
    }

    public float getFatFreeWeight() {
        return fatFreeWeight;
    }

    public void setFatFreeWeight(float fatFreeWeight) {
        this.fatFreeWeight = fatFreeWeight;
    }

    public void setInorganicSalt(float inorganicSalt) {
        this.inorganicSalt = inorganicSalt;
    }

    public float getInorganicSalt() {
        return inorganicSalt;
    }

    @NonNull
    @Override
    public String toString() {
        return "BodyCompositionData{" +
                "bodyFatRate=" + bodyFatRate +
                ", bodyWaterRate=" + bodyWaterRate +
                ", protein=" + protein +
                ", intracellularFluid=" + intracellularFluid +
                ", extracellularFluid=" + extracellularFluid +
                ", muscleMass=" + muscleMass +
                ", basalMetabolism=" + basalMetabolism +
                ", fatFreeWeight=" + fatFreeWeight +
                ", inorganicSalt=" + inorganicSalt +
                '}';
    }

    public List<String> getUnsetFields() {
        List<String> unsetFields = new ArrayList<>();

        if (this.bodyFatRate == 0f) unsetFields.add("bodyFatRate");
        if (this.bodyWaterRate == 0f) unsetFields.add("bodyWaterRate");
        if (this.protein == 0f) unsetFields.add("protein");
        if (this.intracellularFluid == 0f) unsetFields.add("intracellularFluid");
        if (this.extracellularFluid == 0f) unsetFields.add("extracellularFluid");
        if (this.muscleMass == 0f) unsetFields.add("muscleMass");
        if (this.basalMetabolism == 0) unsetFields.add("basalMetabolism");
        if (this.fatFreeWeight == 0f) unsetFields.add("fatFreeWeight");
        if (this.inorganicSalt == 0f) unsetFields.add("inorganicSalt");

        return unsetFields;
    }
}